package com.panshi.api;


import com.panshi.vo.ArticleOkVO;
import com.panshi.vo.TitleVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@FeignClient(value = "zx-server", contextId = "home")
public interface HomeApi {

    //所有标题
    @GetMapping("/zx/title")
    @ResponseBody
    List<TitleVO> listTitleVOs();

    //所有标题
    @GetMapping("/home/page")
    @ResponseBody
    int countHomePage();

    //图文热搜
    @GetMapping("/home/hot/bot")
    @ResponseBody
    List<ArticleOkVO> hotBot();

    //最新创作
    @GetMapping("/home/new")
    @ResponseBody
    List<ArticleOkVO> listHomeNewArticleOkVOs();

    //3条文章
    @GetMapping("/home/load/{type}/{page}")
    @ResponseBody
    List<ArticleOkVO> listHomeArticleOkVOs(@PathVariable int type,@PathVariable int page);



}
